package com.ml.admin.converter;

import com.ml.admin.pojo.po.UserPO;
import com.ml.admin.pojo.vo.UserVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

@Mapper(componentModel = "spring")
public interface LoginConverter {
    UserVO poToVo(UserPO po);
    @Mappings(
            value = {
                    @Mapping(source = "createTime", target = "createTime", dateFormat = "yyyy-MM-dd HH:mm:ss"),
                    @Mapping(source = "updateTime", target = "updateTime", dateFormat = "yyyy-MM-dd HH:mm:ss")
            })
    UserPO voToPo(UserVO po);
}
